package com.htl.exampro.question.pojo.constant;

import lombok.Getter;

@Getter
public enum QuestionTypeConstant {

    DANXT(10001, "单选题"),
    DUOXT(10002, "多选题"),
    PDT(10003, "判断题"),
    TKT(10004, "填空题"),
    JDT(10005, "简答题");

    private final Integer typeId;
    private final String typeName;

    QuestionTypeConstant(final Integer typeId, final String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public String getTypeName(Integer typeId) {
        for (QuestionTypeConstant value : QuestionTypeConstant.values()) {
            if (value.getTypeId().equals(typeId)) {
                return value.getTypeName();
            }
        }
        return null;
    }

}
